package com.mineplatform.mapper;

import java.util.ArrayList;
import java.util.List;

import com.mineplatform.domain.M_Reply;
import com.mineplatform.domain.ReplyContainsUserInfo;
import com.mineplatform.dto.rep.RepliesItemRep;

public class RepliesItemRepMapper {

	public static List<RepliesItemRep> parse(List<ReplyContainsUserInfo> replies) {

		List<RepliesItemRep> list = new ArrayList<RepliesItemRep>();

		for (ReplyContainsUserInfo reply : replies) {

			RepliesItemRep rep = new RepliesItemRep();

			rep.setReplyid(reply.getId());
			rep.setUserid(reply.getUserId());			
			rep.setMineid(reply.getMineId());
			
			rep.setPubtime(reply.getReplyReportTime());
			rep.setContent(reply.getReplyText());			
			rep.setNickname(reply.getUserNickName());			
			rep.setAvatar(reply.getUserAvatar());
			
					
			
			list.add(rep);

		}

		return list;
	}

}
